Skip to content

C++: Deduplicate OutNodes#12141

Merged
MathiasVP merged 4 commits intogithub:mathiasvp/replace-ast-with-ir-use-usedataflowfrom
MathiasVP:fix-multiple-out-nodes
Feb 10, 2023
Merged

C++: Deduplicate OutNodes#12141
MathiasVP merged 4 commits intogithub:mathiasvp/replace-ast-with-ir-use-usedataflowfrom
MathiasVP:fix-multiple-out-nodes

Conversation

@MathiasVP
Copy link
Copy Markdown
Contributor

I discovered a small inconsistency related to how we pick the node that represents the output of a call. In certain cases such as:

long f();

void test() {
  int y;
  long x = (long)(y = (int)f());
}

it was possible to have multiple OutNode all receiving the value returned by f.

AFAIK, there's no real observable effect from this. At most, it's a small optimization. I've added a new inline-expectations test to catch these in the future.

The first commit adds this test and accepts the test changes, and the second commit fixes the failures.

@MathiasVP MathiasVP requested a review from a team as a code owner February 9, 2023 16:59
@github-actions github-actions Bot added the C++ label Feb 9, 2023
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Feb 9, 2023
Copy link
Copy Markdown
Contributor

@jketema jketema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if DCA is happy.

@MathiasVP
Copy link
Copy Markdown
Contributor Author

Nothing interesting on DCA.

@MathiasVP MathiasVP merged commit 9aa9187 into github:mathiasvp/replace-ast-with-ir-use-usedataflow Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants